import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './styles/index.scss'
import { createPinia } from 'pinia'
import router from './router'
// 注意: 权限文件(要在路由导入之后处理)
import './permission'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { focus, color, auth } from '@/directive/index'
import AuthBtn from './components/AuthBtn.vue'

const app = createApp(App)

app.use(ElementPlus, {
  locale: zhCn
})
app.use(createPinia())
app.use(router)

// 注册自定义指令
app.directive("focus", focus);
app.directive("color", color);
app.directive("auth-btn", auth);

// 全局注册组件
app.component("auth-btn", AuthBtn);

app.mount('#app')


